/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package maping;

/**
 *
 * @author Jhon
 */
public class OurLine {
    private int x1;
    private int y1;
    private int x2;
    private int y2;

    public OurLine(int x1,int y1,int x2,int y2){
        this.x1=x1;
        this.y1=y1;
        this.x2=x2;
        this.y2=y2;

    }
    public void sort(){
        int aux;
        if(x1<x2){
           aux=x1;
           x1=x2;
           x2=aux;
           aux=y1;
           y1=y2;
           y2=aux;
        }
    }

    /**
     * @param x2 the x2 to set
     */
    public void setX2(int x2) {
        this.x2 = x2;
    }

    /**
     * @param y2 the y2 to set
     */
    public void setY2(int y2) {
        this.y2 = y2;
    }

    /**
     * @return the x1
     */
    public int getX1() {
        return x1;
    }

    /**
     * @return the y1
     */
    public int getY1() {
        return y1;
    }

    /**
     * @return the x2
     */
    public int getX2() {
        return x2;
    }

    /**
     * @return the y2
     */
    public int getY2() {
        return y2;
    }
}
